<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/* Start of file auths.php */
/* Location: ./member/models/auths.php */
class Members extends CI_Model {
	function __construct(){
        // Call the Model constructor
        parent::__construct();
    }
	
	function getAllMembers(){
		$sql = " SELECT member_name,member_status,member_group,member_gender,member_location,(DATE_FORMAT(last_activity,'%d-%m-%Y %H:%i:%s')) as last_activity";
		$sql.= " FROM members";
		$Q=$this->db->query($sql);
		$val=$Q->result_array();
		return $val;
	}
	
	function getMemberData($username='',$email=''){
		if($username)
			$this->db->where('member_nick',$username);
		elseif($email)
			$this->db->where('member_email',$email);
		$Q=$this->db->get('members');
		return $Q->row_array();
	}
}